home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / tvmouse.exe / README < prev    next >
Text File  |  1993-01-04  |  4KB  |  83 lines

  1. These routines were sent to John Friel, author of QModem.  I included
  2. this letter to him because it explains the routines.
  3. -----------------------------------------------------------------------
  4. Hi John,
  5.  
  6. Here are some mouse routines that run under Turbo Vision.  They provide
  7. the following enhancements.
  8.  
  9. 1) They are fast for hiding and unhideing the mouse.  Calling INT 33 func
  10.    0x01 and 0x02 is really slow.  When using these routines, hiding
  11.    and unhiding the mouse is almost instant.  If they were re-written
  12.    in assembly they'd be even faster.
  13.  
  14. 2) They don't take alot of overhead.
  15.  
  16. 3) They allow support for other text modes.  (like 100x60 or 132x50).
  17.    Turbo Vision already supports odd text modes.  Just run whatever
  18.    text mode setting program that came with your SVGA card and set
  19.    the text mode to something non-standard.  Now run QModemPro and notice
  20.    that Turbo Vision is using the entire display.  Also notice that the
  21.    mouse is not 'synced' to the display.  If you use these routines
  22.    then the mouse will work even in these modes.
  23.  
  24. 4) They can return any range of values for any display resolution.
  25.  
  26. 5) They work in all modes on all mouse drivers because they compute
  27.    there own position.  This is the original reason I wrote these
  28.    routines because on mode 0x13 (320x200x256) the Microsoft and
  29.    Logitech drivers return a different range of values from INT 33
  30.    func 0x03 and there is no solution except to do something like
  31.    this.
  32.  
  33. The files here are the sample program TVEDIT from the
  34. C:\BORLANDC\TVISION\DEMOS diretory.  I didn't change any of those files.
  35. The only files I changed are TEVENT.CPP and TMOUSE.CPP from the
  36. C:\BORLANDC\TVISION\SOURCE directory and I added IBMMOUSE.cpp.
  37.  
  38. Go into the IDE and load 'TVEDIT.PRJ' and check the directories so they
  39. point to the correct libs and includes and then compile.  Now exit the
  40. IDE and switch to any text mode like 132x25 or 132x44 or 132x50 or 100x60.
  41. (My Video7 VRAM supports these modes as does my STB Powergraph/VGA).  Now
  42. run TVEDIT and notice it is fully functional.
  43.  
  44. This file was original used for some graphic tools and not text mode.
  45.  
  46. SetMouseRange() sets the min and max values that the mouse routines will
  47.                 return when calling ReadMouse ().  This routine does not
  48.                 'bound' the mouse to a certain area of the screen.
  49.  
  50. SetMousePosition() sets the mouse to a certain position.  That position
  51.                 is relative to the values used in SetMouseRange().
  52.  
  53.  
  54. SetMouseResolution() sets the number of virtual pixels across the display.
  55.                 In otherwords if you set it to 1000 by 1000 then there
  56.                 are 1000 internal positions from the left side of the
  57.                 screen to the right (and up and down) even though ReadMouse()
  58.                 will still only return values inside the range set by
  59.                 SetMouseRange ().  This has the effect of making the mouse
  60.                 more or less sensitive.
  61.  
  62. SetMouseScreenDimensions () sets the width and height of the screen the
  63.                 mouse is being used on.  In otherwords if you are in
  64.                 80x25 text mode then you would call this routine with
  65.                 80, 25.  Turbo Vision already calls this routine.
  66.  
  67.  
  68. I hacked this together real quick and as such there is room for many
  69. improvements.
  70.  
  71. 1) Make it assembly lang for speed and size.
  72. 2) Fix the support for mouseInt() in TEVENT.cpp so that ReadMouse() returns
  73.    information more similar to what used to be passed in by the real
  74.    interrupt.
  75. 3) Speed up the hardware timer interrupt to 60hertz for 'smoother' pointer
  76.    responce.
  77. 4) Fix OpenMouse() and CloseMouse() so they aren't such a mess.
  78. 5) Fix it so it gets it's screen mem pointer from Turbo Vision.  Currently
  79.    the routines are hardcoded for a Color display at 0xB8000
  80.  
  81. GreggT.
  82.  
  83.